<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2021/11/16
  Time: 10:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath();%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />

    <link rel="stylesheet" href="<%=path %>/web/index/css/font.css">
    <link rel="stylesheet" href="<%=path %>/web/index/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="<%=path %>/web/index/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="<%=path %>/web/index/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <script type="text/javascript">
        function save(){
            window.location.href = "tab_money_shops_pre_save";
        }
        function del(id){
            if(window.confirm('你确定要删除此条数据吗？')){
                window.location.href = "update_del?id="+id;
                return true;
            }
        }

    </script>


</head>

<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">理财产品管理</a>
        <a>
          <cite>理财产品列表</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-row" style="text-align: left;">
        <form class="layui-form layui-col-md12 x-so" action="/tab_money_shops_view" method="post" style="text-align: left;">
            产品名称：<input type="text" name="msname"  placeholder="" autocomplete="off" value="${msname}" class="layui-input">
            产品描述：<input type="text" name="discription"  placeholder="" autocomplete="off" value="${discription}" class="layui-input">
            产品价格：<input type="text" name="money"  placeholder="" autocomplete="off" value="${money}" class="layui-input">
            <button class="layui-btn"  lay-submit="" lay-filter="sreach" type="submit"><i class="layui-icon">&#xe615;</i></button>
        </form>
    </div>
    <xblock>
        <button class="layui-btn" onclick="save()"><i class="layui-icon"></i>数据创建</button>
        <span class="x-right" style="line-height:40px">共有数据：${rows} 条</span>
    </xblock>
    <table class="layui-table">
        <thead>
        <tr>
            <th>#</th>
            <th>产品logo</th>
            <th>产品名称</th>
            <th>产品描述</th>
            <th>价格</th>
            <th>增值率</th>
            <th>单位</th>
            <th>是否精品</th>
            <th>状态</th>
            <th>创建人</th>
            <th>创建时间</th>
            <th>操作</th>
        </thead>
        <tbody>
        <c:forEach items="${list }" var="it" varStatus="vs">
            <tr>
                        <td style="width:2%;">${vs.count}</td>
                        <td style="width: 10%;">
                            <img src="<%=path %>/upload/${it.pic }" onerror="this.src='<%=path %>/upload/shop.jpg'" style="width: 80%;height: 80%">
                        </td>


                        <td style="width:10%;font-size: 8px;">${it.msname}</td>
                        <td style="width:20%;font-size: 4px;">${it.discription}</td>
                        <td style="width:6%;">${it.money}</td>
                        <td style="width:6%;">${it.vd}</td>
                        <td style="width:6%;">${it.monunit}</td>
                        <td style="width:7%;font-size: 8px;">
                            <c:if test="${it.isv == '0' }"><strong style="color: darkred;">非精品</strong></c:if>
                            <c:if test="${it.isv == '1' }"><strong style="color: darkgreen;">精品</strong></c:if>
                        </td>

                        <td style="width:6%;font-size: 8px;">
                            <c:if test="${it.flag == '0' }"><strong style="color: darkgreen;">上架</strong></c:if>
                            <c:if test="${it.flag == '1' }"><strong style="color: darkred;">下架</strong></c:if>
                        </td>
                        <td style="width:6%;font-size: 8px;">${it.createname}</td>
                        <td style="width:7%;font-size: 6px;">${it.createtimes}</td>

                        <td class="td-manage" style="width:12%;font-size: 8px;">
                            <c:if test="${it.isv == '0'}">
                                <a  href="update_isv_open?id=${it.id }"  title="精品开启">
                                    <i class="layui-icon">&#xe600;</i>精品开启
                                </a>
                            </c:if>
                            <c:if test="${it.isv == '1'}">
                                <a  href="update_isv_close?id=${it.id }"  title="精品关闭">
                                    <i class="layui-icon">&#xe658;</i>精品关闭
                                </a>
                            </c:if>


                            <c:if test="${it.flag == '0'}">
                                <a  href="/update_flag_close?id=${it.id }"  title="下架">
                                    <i class="layui-icon">&#xe601;</i>下架
                                </a>
                            </c:if>
                            <c:if test="${it.flag == '1'}">
                                <a  href="/update_flag_open?id=${it.id }"  title="上架">
                                    <i class="layui-icon" style="font-size: 10px;">&#xe62f;</i>上架
                                </a>
                            </c:if>


                            <a title="修改"   href="/tab_money_shops_pre_update?id=${it.id }">
                                <i class="layui-icon">&#xe642;</i>修改&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            </a>
                            <a title="删除" onclick="del('${it.id }')" href="javascript:;">
                                <i class="layui-icon">&#xe640;</i>删除
                            </a>
                        </td>

            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="page">
        ${pager }
    </div>

</div>

</body>

</html>
